﻿CREATE PROCEDURE [dbo].[GetEntriesPriorToLastBillingDate]

AS
BEGIN
SELECT     e.EntryLogID
FROM         EntryLog AS e INNER JOIN
                      Projects AS p ON e.ProjectID = p.ProjectID
WHERE     (e.BillingStateID <> 3) AND (e.EntryDate < p.BilledAsOf)
END

